libxl: fix hang due to libxl__initiate_device_remove
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 11 Apr 2012 13:14:09 +0000 (14:14 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 11 Apr 2012 13:14:09 +0000 (14:14 +0100)
commit089f08b94cc7567b5716bfc3bfddbe5ff801a211
treeb1c3e21f8c021dbfd5008d08069e624be2eb16c2
parent5ce5fe6d3798fc51b68fbf5cbea1c2c5c5d1124f
libxl: fix hang due to libxl__initiate_device_remove

libxl__initiate_device_remove might discover that the operation was
complete, immediately (typically, if the device is already removed).

Previously, in this situation, it would return 0 to the caller but
never call libxl__ao_complete.  Fix this.  This necessitates passing
the egc in from the functions which are the ao initiators.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_device.c
tools/libxl/libxl_internal.h